import loguru
from PySide6.QtWidgets import QApplication

from src.core.enums import ProgramsStatus
from src.main_presenter import MainPresenter

if __name__ == "__main__":
    try:
        app = QApplication([])
        presenter = MainPresenter()
        presenter.show()
        app.exec()
    except Exception as e:
        loguru.logger.critical(e)
        presenter.view.status = ProgramsStatus.Error.value
